package de.gameduell.framework.facebook.app.popups {
	import flash.events.Event;

	public class UnlockMoreLivesPopup extends PyramidBasePopup {

		public function UnlockMoreLivesPopup() {
			super("gotMoreLivesPopup", "gotMoreLivesPopup", 0, true);
			
			var lifeCount:int = controller.gameData.maxLives;
			var before:String = (lifeCount - 1) + "/" + (lifeCount - 1);
			var after:String = lifeCount + "/" + lifeCount;
			
			localeData.setValue("lifeCountBefore", before);
			localeData.setValue("lifeCountAfter", after);
			registerButton("okButton", inviteMoreFriends);
			registerButton("skipButton", hide);
		}
		
		private function inviteMoreFriends(event:Event):void {
			controller.inviteFriends();
			hide();
		}
	}
}
